package cn.tedu.jewelry.controller;

import cn.tedu.jewelry.entity.Cart;
import cn.tedu.jewelry.entity.Collect;
import cn.tedu.jewelry.mapper.CollectMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//商品收藏
@RestController
@RequestMapping("/index")
public class CollectController {
    @Autowired(required = false)
    CollectMapper mapper;

    //收藏夹
    @RequestMapping("/collectList")
    public List<Collect> collectList(Integer userid) {
        List<Collect>list = mapper.collectList(userid);
        return list;
    }
}
